<template>
    <div class="userInfo">
        <div class="userInfo-content"> 
            <el-descriptions title="我的详细资料" :column="1" border>
                <el-descriptions-item label="用户名" width="8">{{user.username}}</el-descriptions-item>
                <el-descriptions-item label="真实姓名">{{user.realname}}</el-descriptions-item>
                <el-descriptions-item label="电话">{{user.phone}}</el-descriptions-item>
                <el-descriptions-item label="最近登录时间">{{user.gmtLastLogin}}</el-descriptions-item>
                <el-descriptions-item label="角色">{{user.roles}}</el-descriptions-item>
                <el-descriptions-item label="状态">
                    <el-tag size="small">{{user.status?'正常':'禁用'}}</el-tag>
                </el-descriptions-item>
            </el-descriptions>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { useUserInfo } from '../../stores/admin/index'
 const {user} =useUserInfo()
//  console.log(user,'user');
</script>

<style>
.userInfo {
    padding: 10px;
}

.userInfo-content {
    width: 70%;
}

</style>